//
//  ZZLightViewSettingCollectionViewCell.m
//  ZZBlue
//
//  Created by stonesMonkey on 2017/9/22.
//  Copyright © 2017年 stonesMonkey. All rights reserved.
//

#import "ZZLightViewSettingCollectionViewCell.h"

@interface ZZLightViewSettingCollectionViewCell()

@property (weak, nonatomic) IBOutlet UIImageView *addImage;

@property (weak, nonatomic) IBOutlet UIImageView *iconImage;

@end

@implementation ZZLightViewSettingCollectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.layer.cornerRadius = 5;
}

- (void)setModel:(ZZLightViewSettingCVCellModel *)model {
    
    _model = model;
    
    if (model.model == ZZLightViewSettingCVCellStyleAdd) {
        
        self.addImage.hidden = NO;
        self.iconImage.hidden = YES;
        self.backgroundColor = [UIColor zColorWithRed:31 green:33 blue:36];
        
    }else if (model.model == ZZLightViewSettingCVCellStyleSelect && model.isSelect == YES) {
        
        self.addImage.hidden = YES;
        self.iconImage.hidden = NO;
        self.backgroundColor = model.color;
    } else {
        
        self.addImage.hidden = YES;
        self.iconImage.hidden = YES;
        self.backgroundColor = model.color;
    }
}

@end
